package com.ruoyi.sys.personnel.service.Impl;


import com.ruoyi.common.core.domain.R;
import com.ruoyi.sys.personnel.entity.TbAudit;
import com.ruoyi.sys.personnel.mapper.TbAuditMapper;
import com.ruoyi.sys.personnel.service.TbAuditService;
import com.ruoyi.sys.personnel.vo.TbAuditVO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TbAuditServiceImpl  implements TbAuditService {
    @Resource
    private TbAuditMapper tbAuditMapper;
    R r = new R();
    /**
     * 查所有
     * @param vo
     * @return
     */
    @Override
    public R getAll(TbAuditVO vo) {
        List<TbAudit> all = tbAuditMapper.getAll(vo);

        if (all!= null) {
            r.setCode(0);

            r.setData(all);
            r.setMsg("查询成功");
        }else{
            r.setCode(-1);
        }

        return r;
    }
}
